package com.cctc.mychat.client.command.impl;

import com.cctc.mychat.client.command.Command;
import io.netty.channel.Channel;

import java.util.Scanner;

public abstract class AbstractCommand implements Command {
    @Override
    public void exec(Scanner scanner, Channel channel) {
        run(scanner, channel);
        waitResponse();
    }

    protected abstract void run(Scanner scanner, Channel channel);

    private void waitResponse() {
        try {
            Thread.sleep(3000);
        } catch (InterruptedException ignored) {
        }
    }
}
